<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMentalListsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('mental_lists', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('type_id')->nullable()->comment('类型');
            $table->string('title')->nullable()->comment('标题');
            $table->string('desc')->nullable()->comment('描述');
            $table->string('cover')->nullable()->comment('封面');
            $table->decimal('price')->default('0.00')->nullable()->comment('价格');
            $table->integer('num')->default('0')->nullable()->comment('数量');
            $table->tinyInteger('is_recommend')->default('0')->comment('是否推荐');
            $table->integer('order')->nullable()->comment('排序');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('mental_lists');
    }
}
